/**
 * 
 */
package com.woniuxy.provider;

import java.math.BigDecimal;

import org.apache.ibatis.jdbc.SQL;

import com.woniuxy.pojo.Member;
import com.woniuxy.pojo.Room;

/**
 * @author Fz
 * @date 2019年8月1日 下午5:05:54
 * @param 
 * @return
 */
public class RoomProvider {
	private final  String  tableName="room";
	private SQL sql=new SQL();
	public String updateRoom(Room room){
		sql.UPDATE(tableName);
		if(room.getRfood() != null && !room.getRfood().equals("")){
			sql.SET("rfood=#{rfood}");
		}if(room.getRtid() != 0){
			sql.SET("rtid=#{rtid}");
		}if(room.getRspring() != null && !room.getRspring().equals("")){
			sql.SET("rspring=#{rspring}");
		}if(room.getRprice().compareTo(new BigDecimal(0)) > 0){
			sql.SET("rprice=#{rprice}");
		}if(room.getRstate() != null && !room.getRstate().equals("")){
			sql.SET("rstate=#{rstate}");
		}if(room.getRmessage() != null && !room.getRmessage().equals("")){
			sql.SET("rmessage=#{rmessage}");
		}
		return sql.toString();
	}
}
